<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>新闻公告管理</title>
    <meta charset="UTF-8"/>
    <meta name="decorator" content="footer"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
    <link rel="stylesheet" href="${ctxStatic}/oaApp/css/mail.css" />
    <script type="text/javascript">
        function page(n,s){
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
    <style>
        ul{ list-style: none; margin: 0;padding: 0}
        #auditFlag{
            display: block !important; width: 100%}
        #s2id_auditFlag{
            display: none;}
        label,input{ width: 100% !important;
            float: left; }
        input{
            height: 30px !important;}
        #btnSubmit{ margin-top: 20px;}
    </style>

</head>
<body>
<div class="title_Infor">
    <a href="${ctx}/sys/menu/tree?parentId=15028ed225a548bf931d27e0ca15f669" class="pull-left"><img src="${ctxStatic}/oaApp/img/liucheng_Icon/fanhui.png" />返回</a>
    <h3 >我的新闻</h3>
</div>

<form:form id="searchForm" modelAttribute="oaNews" action="${ctx}/oa/oaNews/more" method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
        <li><label>标题：</label>
            <form:input path="title" htmlEscape="false" maxlength="200" class="input-medium"/>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary " type="submit" value="查询"/></li>
        <li class="clearfix"></li>
    </ul>
</form:form>

<div class="span6">
            <div class="widget-box wek_box">
                <c:forEach items="${page.list}" var="news" >
            <div class="widget-content nopadding updates collapse in bor_N">
                <div class="new-update clearfix"><i><img class="img-circle img-polaroid"
                                                         src="${ctxStatic}/oaApp/img/touxiang.jpg"> </i>
                    <div class="update-done"><a title="" href="#"><strong class="fontS_16">${news.createManName}</strong></a>
                          <span class="fontS_14">状态：
                           <c:if test="${news.auditFlag eq '1'}">
                               已发布
                           </c:if>
                            <c:if test="${news.auditFlag eq '0'}">
                                待审核
                            </c:if>
                            <c:if test="${news.auditFlag eq '2'}">
                                拒绝发布
                            </c:if>
                    </span></div>
                    <div class="update-date"><span class="update-day" style="font-size: 12px"><fmt:formatDate value="${news.createDate}"
                                                                                                              pattern="yyyy-MM-dd"/></span>新闻公告</div>
                </div>
                <div class="new-update clearfix pad_T_no">
                    <a href="${ctx}/oa/oaNews/getMyAuditNews?id=${news.id}"><h4> ${fns:abbr(news.title,25)}</h4></a>
                    <span class="fontS_14"> ${fns:abbr(news.content,30)}</span>
                    </a>
                </div>
            </div>
            <c:set var="nowDate" value="<%=System.currentTimeMillis()%>"></c:set>
        </c:forEach></div>
</div>
<img class="touchRun" style="position:absolute; bottom:0px;width: 400px;height: 200px;display: none;z-index: 999" src="${ctxStatic}/oaApp/img/loadTouch.gif"/>


<script type="text/javascript">
    function goPage(newURL) {
        if (newURL != "") {
            if (newURL == "-") {
                resetMenu();
            }
            else {
                document.location.href = newURL;
            }
        }
    }
    function resetMenu() {
        document.gomenu.selector.selectedIndex = 2;
    }
</script>
<!--发布按钮-->
<%--<script>--%>
    <%--$(function(){--%>
        <%--$(window).scroll(function(){--%>
            <%--tongyongScroll($(this));--%>
        <%--});--%>
    <%--})--%>

<%--</script>--%>
<script src="${ctxStatic}/oaApp/js/oaScroll.js"></script>
<script>
    $(function(){
        /*初始化*/
        var pageNo = 2;
        var pageSize = 4;
        var time =Math.ceil(parseInt(${listAmount})/pageSize);


        /*监听加载更多*/
        $(window).scroll(function(){
            var url='${ctx}/oa/oaNews/getNewsMore?auditFlag=1&pageNo='+pageNo+'&pageSize='+pageSize;
            touchScroll(pageNo,pageSize,time,url,".wek_box");
            pageNo++;
        });
    });
</script>
</body>
</html>
